
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" isELIgnored="false" %>

  <script type="text/javascript">

    $(function(){

        $("#btn").click(function(){

            $.post("${pageContext.request.contextPath}/admin/login",$("#loginForm").serialize(),function(result){
                if(result.status){
                    location.href="${pageContext.request.contextPath}/back/back.jsp";
                }else{
                    alert(result.message);
                }
            },"JSON")

        })


    })

  </script>




<form id="loginForm" method="post">
  <div style="margin-top: 100px;" align="center">
    <label>用户名:</label><br>
    <input class="easyui-textbox" type="text" name="username" data-options="required:true" />
  </div>
  <div style="margin-top: 10px;" align="center">
    <label>密码:</label><br>
    <input class="easyui-textbox" type="text" name="password" data-options="required:true" />
  </div>
  <div style="margin-top: 10px;" align="center">
    <label>验证码:</label><br>
    <input class="easyui-textbox" type="text" name="code" data-options="required:true" /><br/>
    <img src="${pageContext.request.contextPath}/code/code" alt="">
  </div>

  <div style="margin-top: 10px;" align="center">
    <a class="easyui-linkbutton" id="btn" data-options="iconCls:'icon-man',width:100,height:30">登陆</a>
  </div>

</form>


